Environment variables are values stored outside of the codebase, used for externalizing configuration settings or sensitive information in Node.js applications. They can be accessed using `process.env` and managed through operating system command-line interfaces, configuration files, or modules like dotenv or config. Environment variables enable managing configuration across different environments, reducing the risk of exposing sensitive data, and easily switching between deployment environments without modifying code.
